package cn.itcast.consumer.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


@Data
@AllArgsConstructor //生成全参数构造函数
@NoArgsConstructor//生成无参构造函数
public class Result {
    private Object data;//返回数据
    private boolean message;//返回结果信息

    public static Result success(Object data){
        return new Result(data, true);
    }

    public static Result error(Object data){
        return new Result(data, false);
    }
}